package models

import (
	"awesomeProject1/pkg/chain"
	"awesomeProject1/pkg/db"
	"awesomeProject1/services/contract/invoking"
	"github.com/simplechain-org/client/log"
	"math/big"
)

type Common struct {
	ListenPort string `yaml:"listenPort"`
}

type Config struct {
	Common       *Common           `yaml:"common"`
	DB           *db.Config        `yaml:"db"`
	DBOnlineList []db.ConfigOnline `yaml:"db_online"`
	Chain        *chain.Config     `yaml:"chain"`
	Contract     *invoking.Config  `yaml:"contract"`
	Account      *AccountConfig    `yaml:"account"`
	Log          *log.Config       `yaml:"log"`
}

type AccountConfig struct {
	GasPrice    *big.Int `yaml:"gasPrice"`
	GasLimit    uint64   `yaml:"gasLimit"`
	Keystore    string   `yaml:"keystore"`    //账户私钥文件
	Password    string   `yaml:"password"`    //账户私钥密码文件
	AccountPath string   `yaml:"accountPath"` //上链账户目录

	ContractAccount  string `yaml:"contractAccount"`  //调用合约业务的账户
	ContractAccounts string `yaml:"contractAccounts"` //调用合约业务的账户
}
